var Script = function() {
	$().ready(function() {
		var $addForm = $("#addForm"), $submit = $addForm.find(":submit");
		$submit.prop("disabled", false);
		$addForm.validate({
			rules : {
				name : {
					require: true,
					minlength:2,
					maxlength:20
				},
				xiangUnit : "required",
			},
			messages : {
				name : {
					require: "产品名称不能为空",
					minlength:"产品名称长度2-20",
					maxlength:"产品名称长度2-20"
				},
				xiangUnit : "required"
			}
		});
	});

}();